package com.njbtd.common;

import com.github.pagehelper.Page;
import lombok.Data;

import java.util.List;

/**
 * @ClassName PageResult
 * @Description TODO
 * @Author leolinzc
 * @Date 24.5.7 10:21
 * @Version 1.0
 */
@Data
public class PageResult<E> {

    private int pageNum;

    private int pageSize;

    private long total;

    private List<E> rows;

    public PageResult(Page page) {
        this.pageNum = page.getPageNum();
        this.pageSize = page.getPageSize();
        this.total = page.getTotal();
        this.rows = page.getResult();
    }
}
